package service;

import java.util.Collection;

import dao.DAOFactory;
import dto.Student;

public class StudentServices {
	public void createStudent(Student s)
	{
		DAOFactory.getStudentDAO().saveStudent(s);
	}
	
	public Student findStudent(int sid)
	{
		return DAOFactory.getStudentDAO().getStudent(sid);
	}
	
	public Collection<Student> findAllStudentByName(String namePattern)
	{
		return DAOFactory.getStudentDAO().getAllStudentsByName(namePattern);
	}
	
	public void updateStudent(Student s)
	{
		DAOFactory.getStudentDAO().updateStudent(s);
	}
}
